package com.example.design.factory.phone.abst;

import com.example.design.factory.phone.abst.abstractfactory.AbstractFactory;
import com.example.design.factory.phone.abst.abstractfactory.AppleFactory;
import com.example.design.factory.phone.abst.abstractfactory.MiFactory;

/**
 * @Description 工厂方法模式测试类
 * @ClassName MethodFactoryTest
 * @Author Administrator
 * @Date 2020/5/13 19:38
 * @Version 1.0.0
 */
public class MethodFactoryTest {
    public static void main(String[] args) {
        AbstractFactory miFactory = (AbstractFactory) new MiFactory();
        miFactory.makePhone();
        miFactory.makePC();

        AbstractFactory appleFactory = new AppleFactory();
        appleFactory.makePhone();
        appleFactory.makePC();
    }
}
